/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package sda.levelup.swing;

import java.awt.BorderLayout;
import java.awt.FlowLayout;
import javax.swing.Box;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

/**
 *
 * @author Дима
 */
public class ButtonPanel extends JPanel
{

    public ButtonPanel() {
        addButtons();
    }
    private void addButtons(){
        
        Box sps = Box.createHorizontalBox();
        sps.add(Box.createHorizontalStrut(50));
        sps.add(new JButton("Start"));
        sps.add(Box.createHorizontalGlue());
        sps.add(new JButton("Pause"));
        sps.add(Box.createHorizontalGlue());
        sps.add(new JButton("Stop"));
        sps.add(Box.createHorizontalGlue());
        BorderLayout bl = new BorderLayout();
        setLayout(bl);        
        add(sps, BorderLayout.SOUTH);
        Box left = Box.createHorizontalBox();
        left.add(new JButton("Step Left"));
        add(left, BorderLayout.WEST);
        Box right = Box.createHorizontalBox();
        right.add(new JButton("Step right"));
        add(right, BorderLayout.EAST);
        
        JLabel sin = new JLabel("Sin=");
        JLabel cos = new JLabel("Cos=");
        Box sc = Box.createVerticalBox();
        sc.add(sin);
        sc.add(cos);
        add(sc);
    }
    
}
